<html>
  <script src="/js/primus.js"></script>
  <script>
  (function () {
    var primus = new Primus();

    primus.on('data', function incoming(data) {
      //console.log('data', 'Received data', data);
      var list=document.querySelectorAll('ul')[0];
      var item=document.createElement('li');

      item.innerText=data;

      list.removeChild(list.querySelectorAll('li:first-child')[0]);
      list.appendChild(item);
    });

  })();
  </script>
  <ul>
    <li>One</li>
    <li>Two</li>
    <li>Three</li>
  </ul>
</html>
